(function (zn){

    var Bindable = zn.data.Bindable;

    /**
     * @class Element
     * @namespace zn.ui.core
     * @desc Defined the structure of an basic ui element.
     */
    var Component = zn.class('zn.ui.core.Component', zn.ui.core.Element, {
        mixins: [ Bindable ],
        events: [

        ],
        properties: {

        },
        methods: {
            init: {
                auto: true,
                value: function (dom) {
                    this._dom = dom || document.createDocumentFragment();
                }
            },
            bind: function (name, value){
                return this.let(name, value, _owner, this), this;
            },
            scan: function (model){
                this.root = zn.$(this._dom, this);
                this.model = this.root.scan(model || $model);
            },
            dispose: function () {
                this.owner = null;
                this.model = null;
            }
        }
    });

})(zn);
